package club.banyuan;

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

class MyQueueTest {
  @Test
  public void queueTest() {
    var queue = new MyQueue<Integer>();
    for (int i = 0; i < 10; i++) {
      queue.offer(i);
    }
    for (int i = 0; i < 10; i++) {
      Assertions.assertEquals(i, queue.peek());
      Assertions.assertEquals(i, queue.poll());
    }
    Assertions.assertNull(queue.poll());
  }
}
